﻿using System;

namespace Teigha.Core
{
	public class OdGsDevice_Internal : OdGsDevice
	{
		public OdGsDevice_Internal(IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
		{
		}

		public override OdRxDictionary properties()
		{
			OdRxDictionary result = (OdRxDictionary)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGsDevice_properties(OdGsDevice.getCPtr(this)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override OdGiContext userGiContext()
		{
			OdGiContext result = (OdGiContext)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGsDevice_userGiContext(OdGsDevice.getCPtr(this)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override void setUserGiContext(OdGiContext pUserGiContext)
		{
			GlobalsPINVOKE.OdGsDevice_setUserGiContext(OdGsDevice.getCPtr(this), OdGiContext.getCPtr(pUserGiContext));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override void invalidate()
		{
			GlobalsPINVOKE.OdGsDevice_invalidate__SWIG_0(OdGsDevice.getCPtr(this));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override void invalidate(OdGsDCRect screenRect)
		{
			GlobalsPINVOKE.OdGsDevice_invalidate__SWIG_1(OdGsDevice.getCPtr(this), OdGsDCRect.getCPtr(screenRect));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override bool isValid()
		{
			bool result = GlobalsPINVOKE.OdGsDevice_isValid(OdGsDevice.getCPtr(this));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override void update(OdGsDCRect pUpdatedRect)
		{
			GlobalsPINVOKE.OdGsDevice_update__SWIG_0(OdGsDevice.getCPtr(this), OdGsDCRect.getCPtr(pUpdatedRect));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override void update()
		{
			GlobalsPINVOKE.OdGsDevice_update__SWIG_1(OdGsDevice.getCPtr(this));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override void onSize(OdGsDCRect outputRect)
		{
			GlobalsPINVOKE.OdGsDevice_onSize__SWIG_0(OdGsDevice.getCPtr(this), OdGsDCRect.getCPtr(outputRect));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override void onSize(OdGsDCRectDouble outputRect)
		{
			GlobalsPINVOKE.OdGsDevice_onSize__SWIG_1(OdGsDevice.getCPtr(this), OdGsDCRectDouble.getCPtr(outputRect));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override void onRealizeForegroundPalette()
		{
			GlobalsPINVOKE.OdGsDevice_onRealizeForegroundPalette(OdGsDevice.getCPtr(this));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override void onRealizeBackgroundPalette()
		{
			GlobalsPINVOKE.OdGsDevice_onRealizeBackgroundPalette(OdGsDevice.getCPtr(this));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override void onDisplayChange(int bitsPerPixel, int xPixels, int yPixels)
		{
			GlobalsPINVOKE.OdGsDevice_onDisplayChange(OdGsDevice.getCPtr(this), bitsPerPixel, xPixels, yPixels);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override OdGsView createView(OdGsClientViewInfo pViewInfo, bool enableLayerVisibilityPerView)
		{
			OdGsView result = (OdGsView)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGsDevice_createView__SWIG_0(OdGsDevice.getCPtr(this), OdGsClientViewInfo.getCPtr(pViewInfo), enableLayerVisibilityPerView), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override OdGsView createView(OdGsClientViewInfo pViewInfo)
		{
			OdGsView result = (OdGsView)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGsDevice_createView__SWIG_1(OdGsDevice.getCPtr(this), OdGsClientViewInfo.getCPtr(pViewInfo)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override OdGsView createView()
		{
			OdGsView result = (OdGsView)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGsDevice_createView__SWIG_2(OdGsDevice.getCPtr(this)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override void addView(OdGsView pView)
		{
			GlobalsPINVOKE.OdGsDevice_addView(OdGsDevice.getCPtr(this), OdGsView.getCPtr(pView));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override OdGsModel createModel()
		{
			OdGsModel result = (OdGsModel)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGsDevice_createModel(OdGsDevice.getCPtr(this)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override void insertView(int viewIndex, OdGsView pView)
		{
			GlobalsPINVOKE.OdGsDevice_insertView(OdGsDevice.getCPtr(this), viewIndex, OdGsView.getCPtr(pView));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override bool eraseView(OdGsView pView)
		{
			bool result = GlobalsPINVOKE.OdGsDevice_eraseView__SWIG_0(OdGsDevice.getCPtr(this), OdGsView.getCPtr(pView));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override bool eraseView(int viewIndex)
		{
			bool result = GlobalsPINVOKE.OdGsDevice_eraseView__SWIG_1(OdGsDevice.getCPtr(this), viewIndex);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override void eraseAllViews()
		{
			GlobalsPINVOKE.OdGsDevice_eraseAllViews(OdGsDevice.getCPtr(this));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override int numViews()
		{
			int result = GlobalsPINVOKE.OdGsDevice_numViews(OdGsDevice.getCPtr(this));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override OdGsView viewAt(int viewIndex)
		{
			OdGsView result = (OdGsView)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGsDevice_viewAt(OdGsDevice.getCPtr(this), viewIndex), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override bool setBackgroundColor(uint backgroundColor)
		{
			bool result = GlobalsPINVOKE.OdGsDevice_setBackgroundColor(OdGsDevice.getCPtr(this), backgroundColor);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override uint getBackgroundColor()
		{
			uint result = GlobalsPINVOKE.OdGsDevice_getBackgroundColor(OdGsDevice.getCPtr(this));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override void setLogicalPalette(uint[] logicalPalette, int numColors)
		{
			GlobalsPINVOKE.OdGsDevice_setLogicalPalette(OdGsDevice.getCPtr(this), logicalPalette, numColors);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}
	}
}
